home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / ffspas.zip / DCALCU.PAS < prev    next >
Pascal/Delphi Source File  |  1993-01-04  |  6KB  |  97 lines

  1. program CALCU_demo;
  2.  
  3. uses CRT, FASTTTT5, MISCTTT5, WINTTT5, KEYTTT5, CALC55;
  4. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  5. {                                 - CALC -                                 }
  6. {--------------------------------------------------------------------------}
  7. {                         Version 1.0    01/21/90                          }
  8. {--------------------------------------------------------------------------}
  9. { (c) Copyright 1990  Final Frontier Software and  William W. Miller, Jr.  }
  10. { All rights reserved                                                      }
  11. {--------------------------------------------------------------------------}
  12. { This program calls the procedure Calculator from the CALC TPU            }
  13. { The calculator unit default colors and number of decimal points          }
  14. { are passed as global variables to the CALCULATOR unit.                   }
  15. {                                                                          }
  16. { Refer to the documentation for further explanation of this and           }
  17. { other add-on procedures:                                                 }
  18. {                                                                          }
  19. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  20. { COLOR.TPU                 CAL.TPU               CALC.TPU                 }
  21. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  22. { COLOR - Change global default colors                                     }
  23. { CALC  - A calculator with + - * / √ and memory functions                 }
  24. {         works with keyboard or mouse                                     }
  25. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  26. {  The source code as shareware is available from:                         }
  27. {                          The Final Frontier BBS                          }
  28. {                          1200, 2400, 9600 Baud                           }
  29. {                          (518) 761-0869                                  }
  30. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  31. { Date February 1, 1990                                                    }
  32. {--------------------------------------------------------------------------}
  33. { Version 1.0                                                              }
  34. {--------------------------------------------------------------------------}
  35. { Written by William W. Miller, Jr.                                        }
  36. {++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  37.  
  38. procedure quit;
  39. begin
  40.     reset_startup_mode;
  41.     mkwin(1,1,80,8,white,blue,1);
  42.   writecenter(2, White, blue,'FFSPAS Calculator Unit');
  43.     writecenter(3, white, blue, 'Copyright(C) 1990 Final Frontier Software');
  44.     writecenter(4, white, blue, 'William W. Miller, Jr.');
  45.     writecenter(5, white,blue, '524 Rock Avenue, Chestertown, New York 12817');
  46.     writecenter(6, white, blue, 'Telephone (518) 494-4097');
  47.     writecenter(7, white, blue, 'Please Register Your Procedures at the Final Frontier BBS (518) 761-0869');
  48.     gotoxy(1, 9);
  49.     beep;
  50.     oncursor;
  51.     halt(1);
  52. end;
  53.  
  54. begin
  55. clrscr;
  56. with CTTT do
  57.    begin                {+++++++++++++++++++++++++++++++++++++++++++++++}
  58.    Fore := black;       { Calculator foreground attribute               }
  59.    Back := cyan;        { Calculator background attribute               }
  60.    statusfore := white; { Status line and mouse buttons foreground attr }
  61.    statusback := blue;  { Status line and mouse buttons background attr }
  62.    tapefore := white;   { Calculator tape foreground attribute          }
  63.    tapeback := black;   { Calculator tape background attribute          }
  64.    Points := 2;         { Number of decimal points - default = 2        }
  65.    if moused then       {+++++++++++++++++++++++++++++++++++++++++++++++}
  66.    BEGIN
  67.       delaytime := 100; { repeat delay for mouse button slow down }
  68.    END;
  69.    if not moused then delaytime := 0; { if no mouse don't delay }
  70.    end;
  71.  
  72.                     {+++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  73. calculator;         { <====== This is the simple call with no parameters    }
  74.                     { which pops up the calculator.                         }
  75. reset_startup_mode; {+++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  76. quit;               { The calculator has: addition                          }
  77. oncursor;           {                     subtraction                       }
  78. END.                {                     multiplication                    }
  79.                     {                     division with divide by zero trap }
  80.                     {                     square root                       }
  81.                     {                     one memory function               }
  82.                     {                     cut and paste from display tape   }
  83.                     {                     mouse support                     }
  84.                     {                     help screens                      }
  85.                     {+++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  86.  
  87.             {+++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  88.       {         FINAL FRONTIER SOFTWARE TURBO PASCAL UNITS    }
  89.             {+++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  90.             {         524 Rock Avenue                               }
  91.             {         Chestertown, New York 12817                   }
  92.             {         Tel. 518-494-4097                             }
  93.             {         Voice and Data                                }
  94.             {+++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  95.             { Software Support - Final Frontier BBS (518) 761-0869  }
  96.             {+++++++++++++++++++++++++++++++++++++++++++++++++++++++}
  97.